<?php  
class ControllerCommonHome extends Controller {
	public function index() {
		$this->document->setTitle($this->config->get('config_title').'管理面板');
		$this->document->setDescription($this->config->get('config_meta_description'));

		$this->data['heading_title'] = '管理面板';
        
        $this->load->model('site');
        $total_sites = $this->model_site->getTotalSites();
        $this->data['total_sites'] = $total_sites;
        
        $this->data['pagerank4_count'] = $this->model_site->getPageRankCount('4');
        $this->data['pagerank5_count'] = $this->model_site->getPageRankCount('5');
        $this->data['pagerank6_count'] = $this->model_site->getPageRankCount('6');
        $this->data['pagerank7_count'] = $this->model_site->getPageRankCount('7');
        $this->data['pagerank8_count'] = $this->model_site->getPageRankCount('8');
        
        

		if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . 'common/home.tpl')) {
			$this->template = $this->config->get('config_template') . 'common/home.tpl';
		} else {
			$this->template = 'common/home.tpl';
		}
		
		$this->children = array(
			'common/footer',
			'common/header'
		);
		$this->response->setOutput($this->render());
	}
}
?>